package com.edu.chongdian;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class Saomajieguo_MainActivity extends AppCompatActivity {
    private Button button1;
    private Button button2;
    private Button button3;
    private  Button button4;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.saomajieguoactivity_main);
        button1=findViewById(R.id.button1);
        button2=findViewById(R.id.button2);
        button3=findViewById(R.id.button3);
        button4=findViewById(R.id.button4);
        String value = getIntent().getStringExtra("key");
        String str1=value.substring(0,1);
        button1.setText(str1);
        String str2=value.substring(1,2);
        button2.setText(str2);
        String str3=value.substring(2,3);
        button3.setText(str3);
        String str4=value.substring(3,4);
        button4.setText(str4);
    }

    public void shijian(View view) {
        Intent intent=new Intent(Saomajieguo_MainActivity.this,chongdianActivity.class);
        startActivity(intent);
    }
}